package com.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.bean.Order;
import com.bean.OrderItems;

import java.util.List;

public interface IOrderService {
    /**
     *
     * @param order
     * @return
     */
    Order insert(Order order);

    /**
     *
     * @param order
     * @return
     */
    Order update(Order order);

    /**
     *
     * @param id
     * @return
     */
    Order getById(Integer id);

    /**
     *
     * @param page
     * @param order
     * @return
     */
    List<Order> getListByPage(IPage page, Order order);

    /**
     *
     * @param id
     * @return
     */
    //订单成交
    Order transact(Integer id);

    /**
     *
     * @param id
     * @return
     */
    //订单取消
    Order cancel(Integer id);

    /**
     *
     * @param order
     * @return
     */
    List<Order> getList(Order order);

    /**
     *
     * @param page
     * @param customerId
     * @return
     */
    List<Order> getListByCustomerId(
            IPage page,
            Integer customerId
    );

    /**
     *
     * @param page
     * @param userId
     * @return
     */
    List<Order> getListByUserId(
            IPage page,
            Integer userId
    );

    /**
     *
     * @param orderItems
     * @return
     */
    OrderItems insertOrderItems(OrderItems orderItems);

    /**
     *
     * @param orderItems
     * @return
     */
    OrderItems updateOrderItems(OrderItems orderItems);

    /**
     *
     * @param id
     * @return
     */
    int deleteOrderItemsById(Integer id);



}



